add_executable(gen_spirv_src main.cpp)
add_executable(gen_spirv_src::gen_spirv_src ALIAS gen_spirv_src) # 起个别名

#include(../fmtlib.cmake)

target_link_libraries(gen_spirv_src PRIVATE fmt)
#get_target_property(VGOT gen_spirv_src LINK_LIBRARIES)
#message("-------------------${VGOT}")

target_include_directories(gen_spirv_src PRIVATE fmt)
#get_target_property(VGOT fmt INTERFACE_INCLUDE_DIRECTORIES)
#message("-------------------${VGOT}")

target_link_directories(gen_spirv_src PRIVATE fmt)
#get_target_property(VGOT fmt INTERFACE_LINK_DIRECTORIES)
#message("-------------------${VGOT}")


if(CMAKE_SYSTEM_NAME MATCHES "Windows")  # 判断平台
    set(OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/gen_spirv_src.exe")
    set(COPY_DST "${CMAKE_CURRENT_SOURCE_DIR}/../glslsrc/")
    add_custom_command(
        TARGET gen_spirv_src
        POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy ${OUTPUT_FILE} ${COPY_DST}
        )

endif()




